
find_package(PkgConfig REQUIRED)
if(PKG_CONFIG_FOUND)

  pkg_search_module(Parpack REQUIRED IMPORTED_TARGET parpack)

  include (FindPackageHandleStandardArgs)
  find_package_handle_standard_args (Parpack
    REQUIRED_VARS Parpack_FOUND Parpack_INCLUDE_DIRS Parpack_LIBRARIES
    VERSION_VAR Parpack_VERSION
    )            

  if(NOT TARGET Parpack::Parpack)
    add_library(Parpack::Parpack ALIAS PkgConfig::Parpack)
  endif()

  mark_as_advanced(Parpack_INCLUDE_DIRS Parpack_LIBRARIES Parpack_VERSION_MAJOR Parpack_VERSION_MINOR Parpack_VERSION_PATCH VERSION_VAR Parpack_VERSION)

endif()